package com.xckj.cycling.viewmodel;

import com.xckj.cycling.bean.BleDevStatusBean;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

/**
 * 蓝牙连接状态更新
 * @author: create by zy
 * 时间：2023/5/6 0006 17:01
 */
public class BleViewModel extends ViewModel {

    // int类型 状态值，复制自com.inuker.bluetooth.library.Constants
    //    public static final int STATUS_UNKNOWN = -1;
    //    public static final int STATUS_DEVICE_CONNECTED = BluetoothProfile.STATE_CONNECTED;
    //    public static final int STATUS_DEVICE_CONNECTING = BluetoothProfile.STATE_CONNECTING;
    //    public static final int STATUS_DEVICE_DISCONNECTING = BluetoothProfile.STATE_DISCONNECTING;
    //    public static final int STATUS_DEVICE_DISCONNECTED = BluetoothProfile.STATE_DISCONNECTED;
    //    public static final int STATUS_DEVICE_SERVICE_READY = 0x13;
    private final MutableLiveData<BleDevStatusBean> connStatusMutableLiveData = new MutableLiveData<>();

    public void setBleConnStatus(BleDevStatusBean status){
        connStatusMutableLiveData.setValue(status);
    }

    public MutableLiveData<BleDevStatusBean> getBleConnStatus(){
        return connStatusMutableLiveData;
    }
}
